home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
billutil.zip
/
WINSKIP.ZIP
/
WINSKIP.C
next >
Wrap
C/C++ Source or Header
|
1992-12-17
|
952b
|
46 lines
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void main()
{
FILE *cfgfile;
time_t time1, time2;
int flag, timevar;
char ch[2];
if( (cfgfile=fopen("c:\\winskip.cfg","r")) != NULL ) {
fgets(ch,2,cfgfile);
fclose(cfgfile);
}
else ch[0]='5';
timevar=atoi(ch);
system("cls");
printf("\n\n\n Pressing any key within %d seconds",timevar);
printf("\n skips booting Microsoft Windows.\n");
sound(1440);
delay(200);
nosound();
time1=time(NULL);
time2=time(NULL);
flag=0;
while( (difftime(time2,time1) < timevar) && (flag==0) ) {
flag=kbhit();
time2=time(NULL);
}
if( flag!=0 ) {
printf("\n\n Booting without Windows...\n");
delay(1000);
system("cls");
exit(1);
}
else {
printf("\n\n Booting with Windows...\n\n\n");
delay(1000);
system("cls");
exit(0);
}
}